Title
Question
Spoken\r\nTutorial, IIT Bombay<o:p></o:p>
\r\n\r\nhttp\r\ns://spoken-tutorial.org<o:p></o:p>
\r\n\r\nPython\r\n3.4.3<o:p></o:p>
\r\n\r\nLoading\r\nData From Files -Assignments<o:p></o:p>
\r\n\r\nAssignment-2<o:p></o:p>
2. Given a file \u201cdata.txt\u201d with three columns of data separated by\r\nspaces. Read it into 3 separate simple
sequences.
Answer \u2013<o:p></o:p>
// sorry, can\u2019t show the\r\nexecution as the file is not available in the download section.<o:p></o:p>
x = loadtxt("C:/Users/Administrator/Desktop/gaurav patni IIT\r\nBombay
...: Tutorials 22 june 2019/data.txt",unpack=True)
<o:p> </o:p>
print (x)
<o:p> </o:p>
3. Given a file \u201cdata.txt\u201d with three columns of data separated by \u201c:\u201d.\r\nRead it into 3 separate simple
sequences.
Answer \u2013<o:p></o:p>
// sorry, can\u2019t show the\r\nexecution as the file is not available in the download section.<o:p></o:p>
x = loadtxt("C:/Users/Administrator/Desktop/gaurav patni IIT\r\nBombay
...: Tutorials 22 june 2019/data.txt",unpack=True,\r\ndelimite
...: r=":")
<o:p> </o:p>
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
print (x)
Python-3.4.3 Loading-Data-From-Files 00-01 min 50-60 sec
Login to add comment